package com.sc.nft.entity.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class AdminSecondEquityPropsPageVO {

    @ApiModelProperty(value = "id")
    private Long id;

    @ApiModelProperty(value = "标题")
    private String firstTitle;

    @ApiModelProperty(value = "权益道具Id")
    private Long equityPropsId;

    @ApiModelProperty(value = "最小价")
    private String minPrice;

    @ApiModelProperty(value = "最高价")
    private String maxPrice;

    @ApiModelProperty(value = "手续费比例")
    private String charge;

    @ApiModelProperty(value = "最低手续费")
    private String minCharge;

    @ApiModelProperty(value = "状态 是否上下架")
    private Boolean status;


    @ApiModelProperty(value = "是否为平台展示")
    private Boolean platformShow;

    @ApiModelProperty(value = "是否为品牌岛展示")
    private Boolean brandShow;

    @ApiModelProperty(value = "是否为企业展示")
    private Boolean firmShow;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty("模板Id")
    private Long panelId;

    @ApiModelProperty("是否开启求购")
    private Boolean enableWantBuy;

    @ApiModelProperty("最低求购价")
    private BigDecimal minWantBuyPrice;

    @ApiModelProperty("最高求购价")
    private BigDecimal maxWantBuyPrice;

    @ApiModelProperty("单次最高求购数量")
    private Integer wantBuyQuantity;

    @ApiModelProperty("求购持有条件")
    private Boolean enableWantBuyHoldCondition;

    @ApiModelProperty("求购消耗道具")
    private Boolean enableWantBuyConsumeProp;

    @ApiModelProperty("求购持有藏品id")
    private Long wantBuyHoldCollectionId;

    @ApiModelProperty("求购持有藏品名称")
    private String wantBuyHoldCollectionName;

    @ApiModelProperty("求购消耗道具id")
    private Long wantBuyConsumePropId;

    @ApiModelProperty("求购消耗道具名称")
    private String wantBuyConsumePropName;

    @ApiModelProperty("求购消耗道具数量")
    private Integer wantBuyConsumePropQuantity;


    public void setMinPrice(BigDecimal minPrice) {
        this.minPrice = minPrice.setScale(2, BigDecimal.ROUND_DOWN).toPlainString();
    }

    public void setMaxPrice(BigDecimal maxPrice) {
        this.maxPrice = maxPrice.setScale(2, BigDecimal.ROUND_DOWN).toPlainString();
    }

    public void setCharge(BigDecimal charge) {
        this.charge = charge.setScale(2, BigDecimal.ROUND_DOWN).toPlainString();
    }

    public void setMinCharge(BigDecimal minCharge) {
        this.minCharge = minCharge.setScale(2, BigDecimal.ROUND_DOWN).toPlainString();
    }

}
